home *** CD-ROM | disk | FTP | other *** search
/ The Atari Compendium / The Atari Compendium (Toad Computers) (1994).iso / files / prgtools / mint / mntdoc01.zoo / mintdoc / cat2 / fputchar.nr < prev    next >
Encoding:
Text File  |  1993-03-03  |  2.0 KB  |  67 lines

  1.  
  2.  
  3.  
  4. Fputchar(2)                Oct. 1, 1991               Fputchar(2)
  5.  
  6.  
  7. N✓NA✓AM✓ME✓E
  8.        Fputchar - read a character from a file
  9.  
  10. S✓SY✓YN✓NO✓OP✓PS✓SI✓IS✓S
  11.        LONG Fputchar( WORD fh, LONG ch, WORD mode );
  12.  
  13. D✓DE✓ES✓SC✓CR✓RI✓IP✓PT✓TI✓IO✓ON✓N
  14.        _✓F_✓p_✓u_✓t_✓c_✓h_✓a_✓r outputs a character to the GEMDOS file whose han-
  15.        dle is _✓f_✓h.  The parameter _✓m_✓o_✓d_✓e has an effect only  if  the
  16.        open  file is a terminal or pseudo-terminal, in which case
  17.        the bits of _✓m_✓o_✓d_✓e have the following meanings:
  18.  
  19.        0x0001 Cooked mode; special control characters  (control-C
  20.               and  control-Z)  are checked for and interpreted if
  21.               found (they cause SIGINT and SIGTSTP, respectively,
  22.               to  be  raised);  also, flow control with control-S
  23.               and control-Q is activated.
  24.  
  25.        If the file receiving output is  a  pseudo-terminal,  then
  26.        all  4  bytes  of _✓c_✓h are recorded in the write, and may be
  27.        retreived by a _✓F_✓p_✓u_✓t_✓c_✓h_✓a_✓r call on  the  other  side  of  the
  28.        pseudo-terminal;  this  allows  programs to pass simulated
  29.        BIOS scan codes and shift key status through  the  pseudo-
  30.        terminal.
  31.  
  32.        If  the file receiving output is not a terminal, then only
  33.        the low order byte of _✓c_✓h is written to the file.
  34.  
  35. R✓RE✓ET✓TU✓UR✓RN✓NS✓S
  36.        4 (the number of bytes of data transferred) if  the  write
  37.        was to a terminal
  38.  
  39.        1 if the write was not to a terminal and was successful
  40.  
  41.        0  if  the bytes could not be output (for example, because
  42.        of flow control)
  43.  
  44.        EIHNDL if _✓f_✓h is not a valid handle for an open file.
  45.  
  46.        A (long) negative BIOS error code if an error occured dur-
  47.        ing physical I/O.
  48.  
  49. S✓SE✓EE✓E A✓AL✓LS✓SO✓O
  50.        _✓B_✓c_✓o_✓n_✓o_✓u_✓t(2),     _✓C_✓a_✓u_✓x_✓o_✓u_✓t(2),     _✓C_✓c_✓o_✓n_✓o_✓u_✓t_✓(_✓2_✓)_✓,     _✓C_✓r_✓a_✓w_✓i_✓o(2),
  51.        _✓F_✓g_✓e_✓t_✓c_✓h_✓a_✓r(2), _✓F_✓w_✓r_✓i_✓t_✓e(2)
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.  
  60.  
  61.  
  62.  
  63.  
  64. Version 0.9          MiNT Programmer's Manual                   1
  65.  
  66.  
  67.